#include "public.h"

int main(int argc, char** argv)
{
	int opt;
	char *fileName = NULL;
	fileName = (void*)malloc(sizeof(char)*LENGTH32__);

	while((opt = getopt(argc, argv, "c:v::h::")) > 0)
	{
		switch(opt)
		{
			case 'c':
				puts(optarg);
				break;
			case 'v':
				printf("2.4.5-el_1\n");
				break;
			case 'h':
				sprintf(fileName, "%s", __FILE__);
        			printf("__%s -c|-v|-h params\n", strtok(fileName, "."));
				break;
			default:
				ShowUsage();
				break;
		}
	}
	if(argc == 1 || argc != optind)
	{
		ShowUsage();
		exit(1);
	}
	free(fileName);
	return 0;
}

void usage(char *prog)
{
	printf("%s -c|-v|-h params\n", prog);
        //fprintf(stderr, "Usage: %s -c|-v|-h params\n", prog);
}
